package com.qzsoft.zhjd.laboratory.modules.asphaltCombustionFurnace.service.impl;

import com.alibaba.fastjson.JSONObject;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Map;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qzsoft.zhjd.common.components.BaseServiceComponent;

import com.qzsoft.zhjd.laboratory.modules.asphaltCombustionFurnace.mapper.AsphaltCombustionFurnaceResMapper;
import com.qzsoft.zhjd.laboratory.modules.asphaltCombustionFurnace.entity.AsphaltCombustionFurnaceResEntity;
import com.qzsoft.zhjd.laboratory.modules.asphaltCombustionFurnace.service.AsphaltCombustionFurnaceResService;


@Service("asphaltCombustionFurnaceResService")
public class AsphaltCombustionFurnaceResServiceImpl extends ServiceImpl<AsphaltCombustionFurnaceResMapper, AsphaltCombustionFurnaceResEntity> implements AsphaltCombustionFurnaceResService {

    @Autowired
    private AsphaltCombustionFurnaceResMapper asphaltCombustionFurnaceResMapper;

    @Autowired
    private BaseServiceComponent baseServiceComponent;

    /**
     * 列表
     */
    @Override
    public IPage<JSONObject> queryPage(Map<String, Object> params) {
        IPage<AsphaltCombustionFurnaceResEntity> page = baseServiceComponent.getPage(params, AsphaltCombustionFurnaceResEntity.class);
        return asphaltCombustionFurnaceResMapper.queryPage(page,params);
    }

    /**
     * 信息
     * @return AsphaltCombustionFurnaceResEntity
     */
    @Override
    public AsphaltCombustionFurnaceResEntity getInfo(String id){
        return getById(id);
    }

    /**
     * 保存
     */
    @Override
    public void saveData(AsphaltCombustionFurnaceResEntity asphaltCombustionFurnaceRes){
        save(asphaltCombustionFurnaceRes);
    }

    /**
     * 修改
     */
    @Override
    public void updateData(AsphaltCombustionFurnaceResEntity asphaltCombustionFurnaceRes){
        updateById(asphaltCombustionFurnaceRes);
    }

    /**
     * 删除单条数据
     * @param id
     */
    @Override
    public void deleteOneData(String id){
        removeById(id);
    }

    /**
     * 删除
     */
    @Override
    public void deleteData(List<String> ids){
        removeByIds(ids);
    }
}
